import pytest
import requests

from api.ihrmemploee import IhrmEmploeeApi
from common.DBUtil import DBUtil
from common.assert_util import common_assert
from common.get_json_util import read_json_data
from config import IHRM_EMP_UPDATE_JSON_DATA_PATH


class TestIhrmEmploeeUpdate:
    @pytest.mark.parametrize("json_data,status_code,success,code,message",read_json_data(IHRM_EMP_UPDATE_JSON_DATA_PATH))
    def test_ihrm_emploee_update(self,json_data,status_code,success,code,message):
        # 发送员工修改接口请求
        em_update_resp=IhrmEmploeeApi.ihrm_emploee_update_api(json_data)

        common_assert(em_update_resp,status_code,success,code,message)

